package com.aca.market.service;

import com.aca.market.entity.Role;
import com.aca.market.entity.RolePerm;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author aca
 * @since 2020-11-13
 */
public interface IRoleService extends IService<Role> {

    /**
     * 由permListId生成对应实体 加入数据库
     * @param permIdList
     * @param roleId
     * @return List<RolePerm>
     */
    List<RolePerm> convertToRolePerm(List<Long> permIdList, Long roleId);

    Set<String> getSubjectRoles(List<String> permissions);
}
